package com.yx.shop.service;

import com.yx.shop.entitly.Address;

import java.util.List;

/**
 * @Classname AddressService
 * @Description TODO:
 * @Date 2021/05/08 20:56
 * @Created by yx
 */
public interface AddressService {
    /**
     * @Author:yx
     * @return java.util.List<com.yx.shop.entitly.Address>
     * @Date 2021/05/09 10:31
     * @param uid
     * @Description:根据用户id查询该用户所有地址
     **/
    List<Address> getAddList(int uid);

    /**
     * @Author:yx
     * @return boolean
     * @Date 2021/05/09 10:31
     * @param address
     * @Description:根据用户id新增地址
     **/
    boolean insertAddress(Address address);

    /**
     * @Author:yx
     * @return boolean
     * @Date 2021/05/09 10:32
     * @param aid
     * @Description:根据地址id删除地址
     **/
    boolean deleteAddByAid(Integer aid);

    /**
     * @Author:yx
     * @return boolean
     * @Date 2021/05/09 10:45
     * @param aid
     * @param uid
     * @Description:根据用户id地址id设置默认地址
     **/
    boolean defaultAdd(Integer aid, int uid);

    /**
     * @Author:yx
     * @return boolean
     * @Date 2021/05/09 10:58
     * @param address
     * @Description:根据uid与aid修改地址信息
     **/
    boolean updateAddress(Address address);
}
